{extend name="layout" /}
{block name="css"}
<style type="text/css">
	label{
		font-size: 13px;
	}
</style>
{block}
{block name="content"}
<div class="content">
			<!-- begin breadcrumb -->
			<ol class="breadcrumb pull-right">
				<li><a href="{:url('Admin/Index/index')}">首页</a></li>
				<li><a href="javascript:;">用户管理</a></li>
				<li><a href="javascript:;">用户信息</a></li>
				<li><a href="javascript:;">修改当前</a></li>
				<li class="active">{$userinfo['username']}</li>
			</ol>
			<!-- end breadcrumb -->
			<!-- begin page-header -->
			<h1 class="page-header">修改当前<small></small></h1>
			<!-- end page-header -->
	<div class="col-md-12">
					<div class="panel panel-inverse" data-sortable-id="index-1">
						<div class="panel-heading">
							<div class="panel-heading-btn">
								<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
								<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-repeat"></i></a>
								<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
								<a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i class="fa fa-times"></i></a>
							</div>
							<h4 class="panel-title">修改当前用户：{$userinfo['username']}</h4>
						</div>
						<div class="panel-body">
							<!-- <div id="interactive-chart" class="height-sm"></div> -->
							<form action="{:url('Admin/Index/updateuser',['id' => $userinfo['id']])}" method="post">
	<div class="form-group">
        <label>用户编号</label>
        <input class="form-control" type="text" name="id" readonly="true" value="{$userinfo.id}">
    </div>
	<div class="form-group">
		<label>用户名称</label>
		<input class="form-control" type="text" name="username" value="{$userinfo.username}">
	</div>
	<div class="form-group">
		<label>邮箱</label>
		<input class="form-control" type="text" name="email" value="{$userinfo.email}">
	</div>
	<div class="form-group">
		<label>状态</label>
		{if condition="$userinfo.status = '1'"}
		<input class="form-control" type="text" name="status" placeholder="正常, 输入0改为禁用!">
		{else/}
		<input class="form-control" type="text" name="status" placeholder="禁用, 输入1改为正常!">
		{/if}
	</div>
	<div class="form-group">
		<label>用户类型</label>
		{if condition="$userinfo.user_type = '0' "}
		<input class="form-control" type="text" name="user_type" value="管理员" disabled="true">
		{else/}
		<input class="form-control" type="text" name="user_type" value="普通用户">
		{/if}
	</div>
	<div class="form-group" style="">
		<label>所属角色： </label>
		{if condition="$roles!=''"}
					    			{foreach $roles as $roles_item}
					    			<label style="color: red;"> <input type="checkbox" name="roles_id[]" value="{$roles_item['roles_id']}" 
					    			{if condition="in_array($roles_item['roles_id'],$rolesid)"}checked{/if}>{$roles_item['roles_name']}</label>
					    			{/foreach}
					    		{/if}
	</div>
	<div class="form-group">
        <label>最后更新时间</label>
		<input class="form-control" type="text" name="update_at" value="{$userinfo.update_at}" disabled="true">
    </div>
    <hr/>
	<div class="form-group">
		<a href="#modal-dialog" class="btn btn-primary" data-toggle="modal">确认修改</a>
		<a href="{:url('Admin/Users/userinfo',['id' => $userinfo['id']])}"><button type="button" class="btn btn-primary pull-right">返回上一级</button></a>
							<!-- #modal-dialog -->
							<div class="modal fade" id="modal-dialog">
								<div class="modal-dialog">
									<div class="modal-content">
										<div class="modal-header">
											<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
											<h4 class="modal-title">提示：</h4>
										</div>
										<div class="modal-body">
											是否确认修改当前的用户信息？
										</div>
										<div class="modal-footer">
											<a href="javascript:;" class="btn btn-sm btn-white" data-dismiss="modal">关闭</a>
											<button type="submit"  class="btn btn-sm btn-success">确认修改</button>
										</div>
									</div>
								</div>
							</div>
	</div>
</form>
						</div>
					</div>
	</div>

</div>
{/block}

